#include <QtGui>
#include <QApplication>
#include "mainWindow.h"

void myMessageOutput(QtMsgType type, const char *msg)
{
	switch (type) {
		case QtDebugMsg:
			fprintf(stderr, "Debug: %s\n", msg);
			break;
		case QtWarningMsg:
			fprintf(stderr, "Warning: %s\n", msg);
			break;
		case QtCriticalMsg:
			fprintf(stderr, "Critical: %s\n", msg);
			break;
		case QtFatalMsg:
			fprintf(stderr, "Fatal: %s\n", msg);
			abort();
     }
 }

int main(int argc, char *argv[])
{
	qInstallMsgHandler(myMessageOutput);
	qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
	QApplication a(argc, argv);
	MainWindow *mainWindow = new MainWindow();
	mainWindow->show();
	return a.exec();
}
